package ManagedBean;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;
import javax.ejb.EJB;
import java.util.List;
import java.util.ArrayList;
import ejb.ManejoUsuariosEJB;
import jpa.entities.Customer;
import jpa.entities.Adress;


@ManagedBean(name = "manejoUsuariosBean")
@RequestScoped
public class ManejoUsuariosBean {

	@EJB
	private ManejoUsuariosEJB manejoUsuariosEJB;
	private Customer customer = new Customer();
	private List<Customer> customers = new ArrayList<Customer>();
 	public Customer getCustomer(){
		return this.customer;
	}
 	public List<Customer> getCustomers(){
		return this.customers;
	}
	private Adress adress = new Adress();
	private List<Adress> adresss = new ArrayList<Adress>();
 	public Adress getAdress(){
		return this.adress;
	}
 	public List<Adress> getAdresss(){
		return this.adresss;
	}

 	private boolean condicion=false;
 	public boolean isCondicion(){
		return this.condicion;
	}
	
	public ManejoUsuariosBean(){
	}
 	public String edit(){
		manejoUsuariosEJB.edit();
		return "void";
	}
 	public String accion(){
		manejoUsuariosEJB.accion();
		//TO-DO change the variable condicionby yours business logic
		condicion=true;
		return "void";
	}


}
